package org.suk.dp.memento;

/**
 * Description: 发起人类<br/>
 * @version V1.0  2017/6/21 12:24  by 石冬冬(dongdong.shi@ucarinc.com) - Heil Hitler
 */
public class Originator {
    private String state;

    public Memento createMemento(){
        return new Memento(this.state);
    }

    public void setMemento(Memento memento){
        state = memento.getState();
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public void show(){
        System.out.println("State=" + this.state);
    }
}
